home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / clarion / gauge / gauge.z / CWGAUGE1.CLW < prev    next >
Text File  |  1995-09-07  |  2KB  |  79 lines

  1.                      MEMBER('CWGAUGE')           ! This is a MEMBER module
  2. ViewReadMe           PROCEDURE
  3.  
  4. FileSize             LONG
  5. BytesThisRead        LONG
  6. BytesRead            LONG
  7. BytesThisCycle       LONG
  8. PercentProgress      BYTE
  9.  
  10. Queue                QUEUE
  11.                        STRING(255)
  12.                      END
  13.  
  14. File                 FILE,DRIVER('ASCII'),NAME('GAUGE.TXT')
  15.                        RECORD,PRE()
  16. String                   STRING(255)
  17.                        END
  18.                      END
  19.  
  20. Counter     LONG
  21. Report REPORT,AT(1000,1000,6500,9000),FONT('MS Serif',12,,FONT:regular),THOUS
  22. Detail DETAIL,AT(,,,167)
  23.          STRING(@s255),AT(104,0),USE(Queue)
  24.        END
  25.      END
  26.  
  27. View WINDOW('About the TREE Application ...'),AT(,,329,236),FONT('MS Sans Serif',8,,FONT:bold),CENTER, |
  28.          IMM,SYSTEM,GRAY
  29.        LIST,AT(3,3,323,210),FONT('FixedSys',9,,FONT:regular),USE(?AsciiBox),VSCROLL,FROM(Queue)
  30.        BUTTON('&Print'),AT(219,218,35,),USE(?PrintView)
  31.        BUTTON('&Close'),AT(271,218,35,),USE(?CloseView)
  32.      END
  33.  
  34.   CODE
  35.   OPEN(View)
  36.   DO FillQueue
  37.   DISPLAY
  38.   SELECT(?AsciiBox)
  39.   ACCEPT
  40.     CASE FIELD()
  41.     OF ?PrintView
  42.       CASE EVENT()
  43.       OF EVENT:Accepted
  44.         SETCURSOR(CURSOR:Wait)
  45.         Counter = 0
  46.         OPEN(Report)
  47.         LOOP
  48.           Counter += 1
  49.           IF Counter > RECORDS(Queue) THEN BREAK.
  50.           GET(Queue,Counter)
  51.           PRINT(Detail)
  52.         END
  53.         CLOSE(Report)
  54.         SETCURSOR
  55.       END
  56.     OF ?CloseView
  57.       POST(Event:CloseWindow)
  58.     END
  59.   END
  60.   CLOSE(View)
  61.   RETURN
  62.  
  63. FillQueue ROUTINE
  64.   IF RECORDS(Queue) = 0
  65.     OPEN(File,10h)
  66.     IF ~ERRORCODE()
  67.       SET(File)
  68.       LOOP UNTIL EOF(File)
  69.         NEXT(File)
  70.         IF ERRORCODE() THEN BREAK.
  71.         Queue = ' ' & File:String
  72.         ADD(Queue)
  73.       END
  74.       CLOSE(File)
  75.     ELSE
  76.       MESSAGE('The Read Me File Is Not Available',,ICON:Exclamation,BUTTON:OK)
  77.       RETURN
  78.     END
  79.   END